package edu.uic.readfile;

import java.util.ArrayList;
import java.util.UUID;

public class SingleFile
{
	public ArrayList<Integer> fileVector = new ArrayList<Integer>();
	public ArrayList<Double> normalVector = new ArrayList<Double>();
	public String fileID = "";
	public String fileName = "";
	public int value = 0; //C = 1, L = -1
	
	public SingleFile(int size)
	{
		fileID = UUID.randomUUID().toString();
		fileVector = new ArrayList<Integer>(size);
		normalVector = new ArrayList<Double>(size);
		for(int i = 1; i <= size; i++)
		{
			fileVector.add(0);
			normalVector.add(0.0);
		}
	}
	
	public void updateVector(int index)
	{
		int num = fileVector.get(index - 1);
		fileVector.set(index - 1, num + 1);
		normalize();
	}
	
	public void normalize()
	{
		for(int i = 1; i <= fileVector.size(); i++)
		{
			normalVector.set(i - 1, fileVector.get(i - 1).doubleValue());
		}
	}
	
	
	
}
